import Vue from "vue";
import Router from "vue-router";
import DataManagement from "./dataManagement";
import SystemManagement from "./systemManagement";
import EquipmentMaintenance from "./equipmentMaintenance";
// import ManufacturerEquipment from "./manufacturerEquipment";
// import BasicDisplay from "./basicDisplay";
import GisMap from "./gisMap";
import AlarmRecord from "./alarmRecord";
import StatisticalAnalysis from "./statisticalAnalysis";
// import InformationFeedback from "./informationFeedback";
import UserManagement from "./userManagement";
Vue.use(Router);

// 后台公共布局模块
const ContainerBackstage = () =>
  import(/* webpackChunkName: "Container" */ "../components/Container/ContainerBackstage.vue");
const Page404 = () =>
  import(/* webpackChunkName: "404" */ "../views/404/404.vue");
const Login = () =>
  import(/* webpackChunkName: "Login" */ "../views/Login/Login.vue");
export default new Router({
  routes: [
    {
      path: "/",
      redirect: "/mapData",
      show: false
    },
    // {
    //   path: "/basicDisplay",
    //   component: ContainerBackstage,
    //   show: true,
    //   list: true,
    //   meta: {
    //     title: "基本数据",
    //     roles: ["admin"],
    //     icon: "iconfont icon-jibenshuju1"
    //   },
    //   children: BasicDisplay
    // },
    {
      path: "/gisMap",
      component: ContainerBackstage,
      show: true,
      list: true,
      meta: {
        title: "GIS地图",
        roles: ["admin"],
        icon: "iconfont icon-xingzhuang"
      },
      children: GisMap
    },
    {
      path: "/dataManagement",
      component: ContainerBackstage,
      show: true,
      list: true,
      meta: {
        title: "数据管理",
        roles: ["admin"],
        icon: "iconfont icon-shujuguanli"
      },
      children: DataManagement
    },
    {
      path: "/systemManagement",
      component: ContainerBackstage,
      show: true,
      list: true,
      meta: {
        title: "系统管理",
        roles: ["admin"],
        icon: "iconfont icon-SysManagement"
      },
      children: SystemManagement
    },
    {
      path: "/equipmentMaintenance",
      component: ContainerBackstage,
      show: true,
      list: true,
      meta: {
        title: "维护记录",
        roles: ["admin"],
        icon: "iconfont icon-weihujilu"
      },
      children: EquipmentMaintenance
    },
    {
      path: "/alarmRecord",
      component: ContainerBackstage,
      show: true,
      list: true,
      meta: {
        title: "报警记录",
        roles: ["admin"],
        icon: "iconfont icon-baojingjilu"
      },
      children: AlarmRecord
    },
    {
      path: "/statisticalAnalysis",
      component: ContainerBackstage,
      show: true,
      list: true,
      meta: {
        title: "统计分析",
        roles: ["admin"],
        icon: "iconfont icon-tongjifenxi"
      },
      children: StatisticalAnalysis
    },
    // {
    //   path: "/informationFeedback",
    //   component: ContainerBackstage,
    //   show: true,
    //   list: true,
    //   meta: {
    //     title: "信息反馈",
    //     roles: ["admin"],
    //     icon: "iconfont icon-ziyuan1"
    //   },
    //   children: InformationFeedback
    // },
    {
      path: "/userManagement",
      component: ContainerBackstage,
      show: true,
      list: true,
      meta: {
        title: "用户管理",
        roles: ["admin"],
        icon: "iconfont icon-yonghuguanli"
      },
      children: UserManagement
    },
    {
      path: "/login",
      component: Login,
      show: false,
      meta: {
        title: "登录页"
      }
    },
    {
      path: "/404",
      component: Page404,
      hidden: false
    },
    {
      path: "*",
      redirect: "/404",
      // component: Page404,
      show: false
    }
  ]
});
